<%@page import="com.cait.dutyfree.common.ServiceFinder"%>
<%@page import="com.cait.dutyfree.pojo.LoginUser"%>
<%@page import="com.cait.dutyfree.dataaccess.UserServiceDAO"%>
<%@ page language="java" import="java.sql.*" %>
<% response.setContentType("text/html");%>
<%
	try {
		String str=request.getParameter("user");
		UserServiceDAO userMgr = (UserServiceDAO) ServiceFinder.findBean("userServiceDAO",getServletContext());
		LoginUser user = userMgr.getUser(str);
		
		if(user == null){
			out.println("<font color='green'>Username is Available</font>");
		}else{
			out.println("<font color='red'>Username is not available</font>");
		}
		
	}catch(Exception e){
		out.println("Exception is ;"+e);
	}
%>